碰撞,击落,三条生命得分 private int AB;
public Control_Obstacles()
{
InitializeComponent();
AB = Tools.RanNext(0, 5);
}
int flyfrequency=0;
private void timer1_Tick(object sender, EventArgs e)
{
if (AB > 2)
{
switch (flyfrequency)
{
case 0:
this.BackgroundImage = Properties.Resources.MonsterA1;
break;
case 1:
this.BackgroundImage = Properties.Resources.MonsterA2;
break;
default:
this.BackgroundImage = Properties.Resources.MonsterA3;
flyfrequency = -1;
break;
}
flyfrequency ;
}
else
{
switch (flyfrequency)
{
case 0:
this.BackgroundImage = Properties.Resources.MonsterB1;
break;
case 1:
this.BackgroundImage = Properties.Resources.MonsterB2;
break;
default:
this.BackgroundImage = Properties.Resources.MonsterB3;
flyfrequency = -1;
break;
}
flyfrequency ;
}
}
}
评论